package com.zsrt.devbase.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zsrt.devbase.dto.RoleDTO;
import com.zsrt.devbase.service.RoleService;

/** 
 * @author leixin  
 * @Email leixin821792669@gmail.com
 * @date 2017年5月18日 上午11:34:13
 * @version 1.0
 */
@Controller
@RequestMapping(value="/role")
public class RoleController extends BaseAjaxController<RoleDTO>{

	@Autowired
	private RoleService roleService;
	
	@Override
	public String init(Model model) {
		
		return "role/roleManage";
	}

	
	@Override
	@ResponseBody
	public Object queryByEntity(RoleDTO entity) {
		Map<String, Object> result = roleService.queryByEntity(entity);
		return result;
	}


	@Override
	public ResponseEntity<Map<String, Object>> delete(List<String> id) {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public ResponseEntity<Map<String, Object>> save(RoleDTO entity,
			BindingResult bindingResult) {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public RoleDTO updateInit(String id) {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public ResponseEntity<Map<String, Object>> update(RoleDTO entity,
			BindingResult bindingResult) {
		// TODO Auto-generated method stub
		return null;
	}

}
